URL: http://www.nomedoseusite.com.br/api_ds_orders.php?cID=&postalcode=&cName=&email=&status=&payment=&date_from=&date_from=&action=orders_list
Header Parameter | Format |
Token | base64_encode() |
Secret | base64_encode() |
base64_encode() |
Parameter | Format | Description |
cID | GET |
Customer Id |
postalcode | GET | Post code of the shipping address or customer address Only number is required Example: 04267000 |
cName | GET | Customer name |
GET | E-mail address of the customer | |
status | GET | Status for filter orders Check the API to get the Status |
payment | GET | Payment for filter the orders |
date_from | GET | Date from for filter orders Example: DD/MM/YYYY |
date_to | GET | Date to for filter orders Example: DD/MM/YYYY |
PHP Sample:
// sample list orders
$add_query_order = '';
if ($_GET['status'] != '') {
$add_query_order .= '&status='.$_GET['status'];
}else{
$add_query_order .= '';
}
$url = $domain_url . '/api_ds_orders.php?action=orders_list'.$add_query_order;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
"Cache-Control: no-cache",
'Token: ' . base64_encode($token),
'Secret: ' . base64_encode($secret),
'E-mail: ' . base64_encode($email))
);
$result = curl_exec($ch);
curl_close($ch);
print_r($result);
// sample list orders eof
Return:
orders_id
customers_name
customers_email_address
order_total
date_purchased
orders_status_name
payment_method